
#ifndef JELLY_SHARE_SRC_IO_FILE_H_
#define JELLY_SHARE_SRC_IO_FILE_H_

#include "src/io/file_io.h"
#include <stdio.h>

namespace jellyfish
{
	namespace io
	{
		class file : public file_io
		{
		public:
			file();
			~file();
            file(const char* file_path,const char* mode);
			virtual bool open(const char* file_path,const char* mode);
			virtual void close();
			virtual uint64 seek(int64 offset, uint32 from);
			virtual uint64 get_position() const;
			virtual uint64 get_length() const;
			virtual uint32 read(void* buf, uint32 count);
			virtual uint32 write(const void* buf, uint32 count);
		private:
			file(const file&);
			file& operator = (const file&);
			FILE* file_;
			uint64 length_;
		};
	}
}


#endif  // JELLY_SHARE_SRC_IO_FILE_H_